import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
let defaultCity = '济宁'
defaultCity = localStorage.city

export default new Vuex.Store({
  state: {
    city: defaultCity
  },
  mutations: {
    changeCity(state,cityName) {
      state.city = cityName
      // 使用本地存储保存数据
      localStorage.city = cityName
    }
  },
  actions: {
  },
  modules: {
  }
})
